<?php

/**
 * 并发模型数据封装类  
 */
class ParallelEntity {

    /**
     *
     * @var string $sql 查询sql语句 
     */
    private $sql;

    /**
     *
     * @var mixed $arg sql语句的参数，如果为空则为null 
     */
    private $arg;

    /**
     *
     * @var mixed $resultSet 查询得到的结果集合 
     */
    private $resultSet;
    
    /**
     *
     * @var string $parallelID 并发模型的id 
     */
    private $paralleID;
    
    /**
     *
     * @var string $keyField 指定查询的主键字段 
     */
    
    private $keyField;

    public function setSql($sql) {
        return $this->sql = $sql;
    }

    public function setArg($arg) {
        return $this->arg = $arg;
    }

    public function setResultSet($resultSet) {
        return $this->resultSet = $resultSet;
    }
    
    public function setParalleID($paralleID){
        return $this->paralleID = $paralleID;
    }

    public function setKeyField($keyField){
        return $this->keyField = $keyField;
    }
    
    
    public function getKeyField(){
        return $this->keyField;
    }
    public function getSql() {
        return $this->sql;
    }

    public function getArg() {
        return $this->arg;
    }

    public function getResultSet() {
        return $this->resultSet;
    }

    public function getParalleId() {
       return $this->paralleID;
    }

}


class parallelSet{
    
    private $parallelEntitySet = array();
    
    private $parallelSetExpression;
    
    public function setParallelEntitySet($parallelEntitySet){
        return $this->parallelEntitySet = $parallelEntitySet;
    }
    
    public function setParallelSetExpression($parallelSetExpression){
        return $this->parallelSetExpression = $parallelSetExpression;
    }
    
    public function pushEntitySet(ParallelEntity $parallelEntity){
        array_push($this->parallelEntitySet, $parallelEntity);
    }
    
    public function getParallelEntitySet(){
        return $this->parallelEntitySet;
    }
    
    public function getParallelSetExpression(){
        return $this->parallelSetExpression;
    }
}

?>
